#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
int main()
{
	int a[20][20];
	int i, j, n;
	scanf("%d", &n);
	for (i = 0; i <n; i++)
	{
		for (j = 0; j <n; j++)
		{
			if (j == 0)
				a[i][j] = 1;
			else if (j > i)
			{
				a[i][j] = 0;
				break;
			}
			else
				a[i][j] = a[i - 1][j - 1] + a[i - 1][j];
			if (a[i][j] != 0)
				printf("%d ", a[i][j]);
		}
		printf("\n");
	}
	return 0;
}